package com.neusoft.elmboot.service;

import java.math.BigDecimal;
import java.util.List;

import com.neusoft.elmboot.po.VirtualWallet;
import com.neusoft.elmboot.po.VirtualWalletTransaction;

/**
 * @author chj
 * @date 2024年10月20日
 */
public interface VirtualWalletService {

	// register a new wallet
	public int saveVirtualWallet(Long walletId);

	// basic funtions
	public int debit(Long walletId, BigDecimal amount);

	public int credit(Long walletId, BigDecimal amount);

	public int transfer(Long fromWalletId, Long toWalletId, BigDecimal amount);

	// 申请和关闭VIP
	public int closeVIP(Long walletId);

	public int openVIP(Long walletId);

	// 冻结和透支功能
	public int frozen(Long walletId, BigDecimal frozenAmount);

	public int unfrozen(Long walletId, BigDecimal frozenAmount);

	public int increaseOverdraftAmount(Long walletId, BigDecimal overdraftAmount);

	public int decreaseOverdraftAmount(Long walletId, BigDecimal overdraftAmount);

	public int closeOverdraft(Long walletId);

	public int openOverdraft(Long walletId);

	// some getting
	public VirtualWallet getVirtualWallet(Long walletId);

	public BigDecimal getBalance(Long walletId);

	public List<VirtualWalletTransaction> listTransactions(Long walletId);

}
